Sets the initial, pop-up, and reshow durations of a ToolTip
#include <GuiToolTip.au3>
_GUIToolTip_SetDelayTime ( $hWnd, $iDuration, $iTime )
| $hWnd | Handle to the ToolTip control (returned by _GUIToolTip_Create.) |
| $iDuration | Flag that specifies which duration value will be set: $TTDT_AUTOMATIC (0) - Set all three delay times to default proportions. (see remarks) $TTDT_RESHOW (1) - Time it takes for subsequent ToolTip windows to appear as the pointer moves from one tool to another $TTDT_AUTOPOP (2) - Time the ToolTip window remains visible if the pointer is stationary within a tool's bounding rectangle $TTDT_INITIAL (3) - Time the pointer must remain stationary within a tool's bounding rectangle before the window appears |
| $iTime | Delay time in milliseconds |
#include <GUIConstantsEx.au3>
#include <GUIToolTip.au3>
#include <MsgBoxConstants.au3>
Example()
Func Example()
Local $hGUI = GUICreate(StringTrimRight(@ScriptName, 4), 350, 200)
Local $iButton = GUICtrlCreateButton("Button ToolTip", 30, 32, 130, 28)
Local $hButton = GUICtrlGetHandle($iButton)
; Create a tooltip control
Local $hToolTip = _GUIToolTip_Create($hGUI)
; Add a tool to the tooltip control
_GUIToolTip_AddTool($hToolTip, 0, "This is the ToolTip text", $hButton)
; set the time for how long the tooltip displays, to 1500 ms
_GUIToolTip_SetDelayTime($hToolTip, $TTDT_AUTOPOP, 1500)
GUISetState()
; Retrieve and display the time that the tooltip displays
MsgBox($MB_SYSTEMMODAL, 'Message', 'Display time : ' & _GUIToolTip_GetDelayTime($hToolTip, $TTDT_AUTOPOP) & ' ms')
While 1
If GUIGetMsg() = $GUI_EVENT_CLOSE Then ExitLoop
WEnd
; Destroy the tooltip control
_GUIToolTip_Destroy($hToolTip)
GUIDelete($hGUI)
EndFunc ;==>Example